using System;

namespace PWFEncrypt
{
	internal sealed class TripleDESKeyIVProvider 
	{
		private static readonly byte s_k1 = 2;
		private static readonly byte s_k2 = 101;
		private static readonly byte s_k3 = 108;
		private static readonly byte s_k4 = 136;
		private static readonly byte s_k5 = 219;
		private static readonly byte s_k6 = 143;
		private static readonly byte s_k7 = 17;
		private static readonly byte s_k8 = 143;
		private static readonly byte s_k9 = 253;
		private static readonly byte s_k10 = 15;
		private static readonly byte s_k11 = 31;
		private static readonly byte s_k12 = 253;
		private static readonly byte s_k13 = 30;
		private static readonly byte s_k14 = 123;
		private static readonly byte s_k15 = 11;
		private static readonly byte s_k16 = 200;
		private static readonly byte s_k17 = 23;
		private static readonly byte s_k18 = 44;
		private static readonly byte s_k19 = 143;
		private static readonly byte s_k20 = 23;
		private static readonly byte s_k21 = 237;
		private static readonly byte s_k22 = 148;
		private static readonly byte s_k23 = 31;
		private static readonly byte s_k24 = 50;

		private static readonly byte s_iv1 = 214;
		private static readonly byte s_iv2 = 125;
		private static readonly byte s_iv3 = 168;
		private static readonly byte s_iv4 = 144;
		private static readonly byte s_iv5 = 80;
		private static readonly byte s_iv6 = 144;
		private static readonly byte s_iv7 = 185;
		private static readonly byte s_iv8 = 200;
		private static byte[] s_key, s_iv;

		static TripleDESKeyIVProvider() 
		{
			s_key = new byte[24] {
									 s_k6, s_k13, s_k5, s_k9, s_k20, s_k19,
									 s_k7, s_k22, s_k11, s_k1, s_k24, s_k14,
									 s_k2, s_k3, s_k21, s_k23, s_k8, s_k12,
									 s_k15, s_k16, s_k10, s_k4, s_k17, s_k18
								 };
			s_iv = new byte[8] {
								   s_iv7, s_iv3, s_iv8, s_iv4, s_iv6, s_iv5,
								   s_iv2, s_iv1
							   };
		}

		public static byte[] Key 
		{
			get { return s_key; }
		}

		public static byte[] IV 
		{
			get { return s_iv; }
		}
	}
}
